import request from '@/utils/request'

// 查询单元维修明细表列表
export function listRepairDoor(query) {
  return request({
    url: '/repair/repairDoor/list',
    method: 'get',
    params: query
  })
}
// 查询
export function listRepairRight(query) {
  return request({
    url: '/repair/repairDoor/rightList',
    method: 'get',
    params: query
  })
}

export function getCalculate(query) {
  return request({
    url: '/repair/repairDoor/getCalculate' ,
    method: 'get',
    params: query
  })
}

// 查询单元维修明细表详细
export function getRepairDoor(houseId,projectId) {
  return request({
    url: '/repair/repairDoor/'+ houseId +"/"+ projectId,
    method: 'get'
  })
}

// 查询单元维修明细表详细
export function getProjectAreaName(projectId) {
  return request({
    url: '/repair/repairDoor/'+ projectId,
    method: 'get'
  })
}

// 新增单元维修明细表
export function insertRepairDoor(houseIds,projectId) {
  return request({
    url: '/repair/repairDoor/insertRepairDoor/'+houseIds+"/"+projectId,
    method: 'get'
  })
}
// 删除单元维修明细表
export function delRepairDoor(houseIds,projectId) {
  return request({
    url: '/repair/repairDoor/delRepairDoor/' +houseIds+"/"+projectId,
    method: 'get'
  })
}

// 修改修改
export function updateRepairDoor(data) {
  return request({
    url: '/repair/repairDoor',
    method: 'put',
    data: data
  })
}

/*// 修改户资金修改
export function updateCalculate(houseId,projectId) {
  return request({
    url: '/repair/repairDoor/updateCalculate/' + houseId +'/'+ projectId,
    method: 'post'
  })
}*/

// 修改户资金修改
export function updateCalculate(data) {
  return request({
    url: '/repair/repairDoor/updateCalculate',
    method: 'put',
    data: data
  })
}

// 获取小区信息
export function getAreaInfo() {
  return request({
    url: '/house/area/list1',
    method: 'get'
  })
}
// 获取小区信息
export function getAreaInfo1(areaName) {
  return request({
    url: '/house/area/list2/'+areaName,
    method: 'get'
  })
}


// 获取楼宇信息
export function getGroupInfo(areaName) {
  return request({
    url: '/house/group/getGroupInfo/'+areaName,
    method: 'get'
  })
}

// 获取单元信息
export function getUnitInfo(areaName,groupName) {
  return request({
    url: '/house/unit/getUnitInfo/'+areaName+"/"+groupName,
    method: 'get'
  })
}



